<%
// searchboxWidth is specified in the different sitemesh layouts

if (searchQueryText && searchQueryText != '') {
    searchBoxValue = searchQueryText
    activateFormDefaults = false
} else {
    searchBoxValue = 'Search...'
    activateFormDefaults = true
}

// Customizable action for searching collections
if (searchUrl == null) {
    searchUrl = '/search'
}

%>
<g:if test="${activateFormDefaults}">
    <jq:jquery>
    $('#searchbox').formDefaults({
        activeColor: '#000',
        inactiveColor: '#51555C'
    });
    </jq:jquery>
</g:if>
    <div class="widget">
        <form id="searchboxform" action="${searchUrl}" method="get" >
            <div class="searchbox">
                <g:textField id="searchbox" name="query" value="${searchBoxValue}" size="${searchboxWidth}" />
                <input type="submit" value="" class="submit" />
            </div>
        </form>
        <div class="clear"></div>
    </div>
